package application.openGL;

import org.lwjgl.opengl.GL11;
import org.lwjgl.util.glu.GLU;

public abstract class GLApplication3D extends GLApplication
{
    public GLGraphics3D gl;
    @Override
    protected void initOpenGL() 
    {
	GL11.glViewport(0, 0, size.width, size.height);
	GL11.glMatrixMode(GL11.GL_PROJECTION);
	GL11.glLoadIdentity();
	GLU.gluPerspective(45, ((float) size.width / (float) size.height), 0.1f, 100.0f);
	GL11.glMatrixMode(GL11.GL_MODELVIEW);
	GL11.glLoadIdentity();

	GL11.glShadeModel(GL11.GL_SMOOTH);
	GL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
	GL11.glClearDepth(1.0f);
	GL11.glEnable(GL11.GL_DEPTH_TEST);
	GL11.glDepthFunc(GL11.GL_LEQUAL);
	GL11.glHint(GL11.GL_PERSPECTIVE_CORRECTION_HINT, GL11.GL_NICEST);
	gl = new GLGraphics3D();
    }
}
